<?php




function randomin($alphabet,$length)
{
	$sample_length = strlen($alphabet);
	$result = "";
	for ($i=0; $i<$length; $i++)
	{
		$result.= substr($alphabet,mt_rand(1,$sample_length)-1,1);
	}
	return $result;
}

function randomchar($length)
{
	return randomin("abcdefghijklmnopqrstuvwxyz",$length);
}

function randomnumber($length)
{
	return randomin("0123456789",$length);
}

function randompassword()
{
	return randomnumber(mt_rand(6,10));
}
if (function_exists("redirect")) {
	//runkit_function_redefine('redirect', '$word', $helloWorld);
} else {
	function redirect($location, $delaytime = 0) {
		if ($delaytime>0) {	
			header( "refresh: $delaytime; url='".str_replace("&amp;", "&", $location)."'" );
		} else {
			header("Location: ".str_replace("&amp;", "&", $location));
		}
			
	}
}
?>
